﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace ST.Buz.Base.Entity
{
	/// <summary>
	/// 用户银行卡信息
	/// </summary>
	[Table("Sys_UserBankCard")]
	public partial class Sys_UserBankCard
	{
		/// <summary>
		/// 
		/// </summary>
		[Key]
		[Column("ID")]
		public int ID { get; set; }

		/// <summary>
		/// 用户ID
		/// </summary>
		[Column("UserID")]
		public int UserID { get; set; }

		/// <summary>
		/// 开户行
		/// </summary>
		[Column("BankName")]
		[StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
		public string BankName { get; set; }

		/// <summary>
		/// 开户人
		/// </summary>
		[Column("AccountName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string AccountName { get; set; }

		/// <summary>
		/// 银行卡号
		/// </summary>
		[Column("AccountNo")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		[RegularExpression(@"^\d{16,20}$", ErrorMessage = "卡号有误")]
		public string AccountNo { get; set; }

		/// <summary>
		/// 开户行地址
		/// </summary>
		[Column("BankAddress")]
		[StringLength(60, ErrorMessage = "{0}长度不能超过{1}")]
		public string BankAddress { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[Column("AddDate")]
		public DateTime AddDate { get; set; }

		/// <summary>
		/// 创建人ID
		/// </summary>
		[Column("AddManID")]
		[JsonIgnore]
		public int AddManID { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[Column("AddManName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string AddManName { get; set; }

		/// <summary>
		/// 最后修改日期
		/// </summary>
		[Column("LastModifyDate")]
		public DateTime LastModifyDate { get; set; }

		/// <summary>
		/// 最后修改人ID
		/// </summary>
		[Column("LastModifyManID")]
		[JsonIgnore]
		public int LastModifyManID { get; set; }

		/// <summary>
		/// 最后修改人
		/// </summary>
		[Column("LastModifyManName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string LastModifyManName { get; set; }
	}
}
